Skip to content

feat(cli): inject locale code into locale files#605

Merged
mathio merged 1 commit intomainfrom
inject-locale
Apr 4, 2025
Merged

feat(cli): inject locale code into locale files#605
mathio merged 1 commit intomainfrom
inject-locale

Conversation

@mathio
Copy link
Copy Markdown
Contributor

@mathio mathio commented Apr 4, 2025

Add array of keys as "injectLocale" to JSON bucket config.

Example:

{
  "version": 1.4,
  "locale": {
    "source": "en",
    "targets": [
      "es", 
      "sk"
    ]
  },
  "buckets": {
    "json": {
      "include": [
        "locales/[locale].json"
      ],
      "injectLocale": [
        "settings.locale",
        "language"
      ]
    }
  },
  "$schema": "https://lingo.dev/schema/i18n.json"
}

This config will replace settings.locale and langauge values with es and sk values if the original value in source file was en.

Add array of keys as "injectLocale" to JSON bucket config.
@mathio mathio merged commit 1dbbfd2 into main Apr 4, 2025
2 checks passed
@mathio mathio deleted the inject-locale branch April 4, 2025 13:31
mainstar123 pushed a commit to mainstar123/lingo.dev that referenced this pull request Jul 7, 2025
Add array of keys as "injectLocale" to JSON bucket config.
17prateek12 pushed a commit to 17prateek12/lingo.dev that referenced this pull request Jan 23, 2026
Add array of keys as "injectLocale" to JSON bucket config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant